package xyz.eden.gateway.springcloud.admin;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Arrays;
import java.util.Optional;

@Slf4j
@SpringBootApplication
public class AdminApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(AdminApplication.class, args);
        String[] beanDefinitionNames = context.getBeanDefinitionNames();
        Arrays.stream(Optional.of(beanDefinitionNames).orElse(new String[]{}))
                .forEach(beanName -> {
                    log.info("beanName [{}].", beanName);
                });
    }
}
